//- Copyright (c) 2016 Lucky Byte, Inc.
extends ../layout

append scripts
  script(src="/js/fee/set.js")

block content
  form.ui.form.attached.segment.main(
    action="/fee/set/edit" method="post" autocomplete="off")

    input(type="hidden" name="serial" value="#{record.serial || ''}")
    input(type="hidden" name="uuid" value="#{record.uuid || ''}")

    h4.ui.dividing.header
      i.caret.down.icon.link.grey.accordion
      | 手续费设置

    .field.sixteen.wide.required
      label 默认消费手续费:
      .ui.dropdown.input.selection
        i.icon.yen
        input(type="hidden" name="t20_fee" value="#{record.t20_fee || ''}")
        i.icon.dropdown
        .default.text 
        .menu
          for fee in fees
            .item(data-value="#{fee.uuid}")
              .right.floated(style="color:#888;") #{fee.notes}
              = fee.name

    h4.ui.dividing.header
      i.caret.down.icon.link.grey.accordion
      | 备注信息

    .fields
      .field.sixteen.wide
        textarea(name="notes" type="text" rows="3"
          placeholder="在此进行更多描述")= record.notes || ''


    .ui.buttons(style="margin-top:40px;")
      button.ui.yellow.button#cancel(type="button"
        onclick="window.location = '/fee'") 取 消
      .or
      if page_perms.edit
        button.ui.green.button#ok(type="submit") 确 定
      else
        button.ui.green.button.disabled#ok(type="submit")
          i.icon.ban(style="margin-top:1px; margin-right:2px;")
          | 确 定
